fix(cli): treat missing whisper-cpp as a skippable prerequisite, not a command failure#1628
Merged
Merged
Conversation
986c621 to
da64995
Compare
…error transcribe hard-failed with cli_error whenever whisper-cpp was absent. On Linux/Docker/CI (no Homebrew, no compiler toolchain) that is unavoidable, so it drove ~30k cli_error/day that are really "install the prerequisite" rather than bugs — and buried genuine transcription failures in the command-error budget. ensureWhisper now throws a typed WhisperUnavailableError when no binary exists and none can be built. The transcribe command reports that on a dedicated transcribe_unavailable metric instead of cli_error, and a new --optional flag lets pipelines skip captions and exit 0. Real transcription crashes still fail as cli_error. init and the skill pipelines already continue without captions. Also removes a stale doc reference to a `transcribe --provider groq` flag that does not exist.
da64995 to
5d422e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hyperframes transcribehard-failed and reported a command error wheneverwhisper-cppwas not present. On environments without Homebrew or a compiler toolchain (most Linux containers and CI), neither of the auto-install paths inensureWhisper()(brew install/ build-from-source) can succeed, so the command threw a generic error — even though a missing optional binary is a setup prerequisite, not a bug.This had two problems:
Changes
ensureWhisper()now throws a typedWhisperUnavailableErrorwhen no binary exists and none can be built, distinct from a real transcription failure.transcribecommand reports this on its owntranscribe_unavailablesignal (with one actionable install hint) instead of the command-error path.--optionalflag: pipelines that treat captions as skippable exit0instead of1.initand the skill pipelines already continue without captions — unchanged.Verification
tsc --noEmit(cli), oxlint, oxfmt, and the repo audit gate all pass.whisper/manager.test.tscovers the classification: typed error, cross-bundle code tag, and that real failures are not misclassified.